{% extends "backend/backendbase.html" %}
{% block users_selected %}class="current"{% endblock %}
{% block tittle %}Book Setting{% endblock %}
{% block table_content %}
	<div id="table-content"><script type="text/javascript">
               function checkInput()
        	   {
            	   	if (document.addBook.title.value=="")
            		{
            			alert("Please enter your own Title");
            			document.addBook.title.focus();
            			return false;
            		}
            	        	
            		if (document.addBook.weight.value=="")
            		{
            			alert("Please enter your own Weight");
            			document.addBook.weight.focus();
            			return false;
            		}                    
                    
                    if (document.addBook.summary.value=="")
            		{
            			alert("Please enter your own Summary");
            			document.addBook.summary.focus();
            			return false;
            		}
                    if (document.addBook.detail.value=="")
            		{
            			alert("Please enter your own Detail");
            			document.addBook.detail.focus();
            			return false;
            		}
                    if (document.addBook.category.value=="")
            		{
            			alert("Please enter your own Category");
            			document.addBook.category.focus();
            			return false;
            		}
       	            if (document.getElementById('thumbnail').value =="")
            		{
            			alert("Please enter your own Thumbnail");
       		            document.addBook.category.focus();
            			return false;
            		}
       	            if (document.getElementById('large').value =="")
            		{
            			alert("Please enter your own Large");
            			document.addBook.category.focus();
            			return false;
            		}
                    alert("Thank You!");
            		return true;
        	   }       	  		
        	
            </script>   

<form name="addBook" method="post" action enctype="multipart/form-data" onsubmit = "return checkInput();"> {% csrf_token %}
	<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
		<tr>
				<th valign="top">Title</th>

				<td><input type="text" name="title" class="inp-form" value="{{var_title_edit}}"/></td>

			</tr>
			
			<tr>

				<th valign="top">Weight:</th>

				<td><input type="text" name="weight" class="inp-form" value="{{var_bweight_edit}}"/></td>
	

			</tr>
			
			<tr>

			<th valign="top">Summary:</th>

			<td><textarea rows="" name="summary" cols="" class="form-textarea" >{{var_summary_edit}}</textarea></td>

			<td></td>

		</tr>
			
			<tr>

			<th valign="top">Detail:</th>

			<td><textarea rows="" name="detail" cols="" class="form-textarea">{{var_detail_edit}}</textarea></td>

			<td></td>

		</tr>

			<tr>

			<th valign="top">Category:</th>

			<td>	

			<select  name="category" class="styledselect_form_1" >
                <!-- Xu ly rieng -->
				<!--<option value="" {selected}>{BstocatContent}</option> -->
				{{var_bcategory_edit}}

			</select>

			</td>


			</tr>

		<tr>

			<th>&nbsp;</th>

			<td valign="top">

				<input name ="submit" type="submit" value="" class="form-submit" />
	

			</td>

			<td></td>

		</tr>

		</table>
</form>
</div>
			
{% endblock %}